<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="animate.js">

    </script>
    <style>
        .slibar {
            position: absolute;
            top: 50%;
            right: 0;
            transform: translateY(-50%);
            width: 50px;
            height: 50px;
            text-align: center;
            line-height: 50px;
            background-color: skyblue;
        }
       
        .c {
            position: absolute;
            left: 0;
            top: 0;
            width: 150px;
            text-align: center;
            height: 50px;
            background-color: skyblue;
            z-index: -1;
        }
    </style>
</head>
<body>

    <div class="slibar">
        <span>←</span>
        <div class="c">帮助</div>
    </div>
    <script>
        var slibar  = document.querySelector('.slibar')
        var span  = document.querySelector('span')
        var c = document.querySelector('.c')
        slibar.addEventListener('mouseenter',function(){
            animate(c,-100);
            span.innerHTML = '→'
        })
        slibar.addEventListener('mouseleave',function(){
            animate(c,0);
            span.innerHTML = '←'
        })

    </script>
</body>
</html>